﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/AdminMaster.Master" AutoEventWireup="true"
    CodeBehind="AdminUserManager.aspx.cs" Inherits="TravelLink.WebApp.Admin.AdminUserManager" %>

<%@ Register Assembly="DevExpress.Web.ASPxGridView.v11.1, Version=11.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v11.1, Version=11.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v11.1.Export, Version=11.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView.Export" tagprefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
var rid;
function CallServer()
{
var rowid = rid+"|1";
<%= ClientScript.GetCallbackEventReference(this, "rowid", "ReceiveServerData",null)%>;
}

function ReceiveServerData(rValue)
{
    if(rValue=='')
    {
    alert('操作成功');
    }
    else
    {
    alert(rValue);
    }
}
    </script>
    <style type="text/css">
        .style1
        {
            width: 920px;
        }
        .style2
        {
            width: 100px;
        }
        .style3
        {
            width: 820px;
            text-align: left;
        }
        .style4
        {
            width: 800px;
        }
        .style5
        {
            width: 930px;
        }
        .style6
        {
            width: 100%;
        }
        .style7
        {
            width: 600px;
        }
        .style8
        {
            width: 500px;
            text-align: left;
        }
        
        .req
        {
            color: Red;
            font: 700 12px/35px;
        }
        .label
        {
            width: 150px;
            border: 1px solid #DCDCDC;
            text-align: left;
            font: 12px;
            font-weight: 600;
            height: 30px;
            padding-left: 2px;
        }
        .input
        {
            border: 1px solid #DCDCDC;
            background-color: #DCDCDC;
            width: 200px;
            text-align: center;
            height: 35px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table cellpadding="0" cellspacing="0" class="style1">
        <tr>
            <td>
                <table class="style1">
                    <tr>
                        <td>
                            <dx:ASPxLabel ID="ASPxLabel1" runat="server" Text="注册时间从：">
                            </dx:ASPxLabel>
                        </td>
                        <td>
                            <dx:ASPxDateEdit ID="adefrom" runat="server">
                            </dx:ASPxDateEdit>
                        </td>
                        <td>
                            <dx:ASPxLabel ID="ASPxLabel2" runat="server" Text="至：">
                            </dx:ASPxLabel>
                        </td>
                        <td>
                            <dx:ASPxDateEdit ID="adeto" runat="server">
                            </dx:ASPxDateEdit>
                        </td>
                        <td>
                            <dx:ASPxCheckBox ID="achkCreatedResume" runat="server" Text="简历创建" 
                                AllowGrayed="True" CheckState="Unchecked" ValueChecked="1" ValueGrayed="2" 
                                ValueType="System.Int32" ValueUnchecked="0">
                            </dx:ASPxCheckBox>
                        </td>
                        <td>
                            <dx:ASPxLabel ID="ASPxLabel3" runat="server" Text="邮箱：">
                            </dx:ASPxLabel>
                        </td>
                        <td>
                            <dx:ASPxTextBox ID="atbmail" runat="server" Width="250px">
                            </dx:ASPxTextBox>
                        </td>
                        <td>
                            <dx:ASPxButton ID="abtnSearch" runat="server" Text="搜索" 
                                onclick="abtnSearch_Click">
                            </dx:ASPxButton>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;</td>
                        <td>
                            &nbsp;</td>
                        <td>
                            &nbsp;</td>
                        <td>
                            &nbsp;</td>
                        <td>
                            &nbsp;</td>
                        <td>
                            <dx:ASPxLabel ID="ASPxLabel4" runat="server" Text="手机：">
                            </dx:ASPxLabel>
                        </td>
                        <td>
                            <dx:ASPxTextBox ID="atbmobile" runat="server" Width="250px">
                            </dx:ASPxTextBox>
                        </td>
                        <td>
                            <dx:ASPxButton ID="ASPxButton1" runat="server" onclick="ASPxButton1_Click" 
                                Text="导出Excel">
                            </dx:ASPxButton>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td><dx:ASPxGridView ID="ASPxGridView1" runat="server" Width="931px" AutoGenerateColumns="False"
                    DataSourceID="LinqDataSource1" KeyFieldName="UserCode" ClientInstanceName="agvcompany"
                    EnableViewState="False" onrowdeleted="ASPxGridView1_RowDeleted" 
                    onrowdeleting="ASPxGridView1_RowDeleting" 
                    onhtmldatacellprepared="ASPxGridView1_HtmlDataCellPrepared" 
                    onhtmlcommandcellprepared="ASPxGridView1_HtmlCommandCellPrepared">
                    <SettingsDetail ShowDetailRow="false" AllowOnlyOneMasterRowExpanded="true" />
                    <SettingsBehavior ColumnResizeMode="Disabled" ConfirmDelete="true" />
                    <ClientSideEvents CustomButtonClick="function(s, e) {
	if(e.buttonID=='gvcc1')
{
      var url='/Member/ViewJobCN.aspx?uid='+agvcompany.GetRowKey(e.visibleIndex);
window.open(url);
}
else if(e.buttonID=='gvcc2')
{
      var url='/Member/MemberViewJob_EN.aspx?uid='+agvcompany.GetRowKey(e.visibleIndex);
window.open(url);
}
else
{
rid=e.visibleIndex;
	CallServer();
}
}" />
                    <Columns>
                        <dx:GridViewCommandColumn ButtonType="Button" Caption="操作" 
                            ShowInCustomizationForm="True" VisibleIndex="19" Width="30px">
                            <EditButton Text="修改" Visible="True">
                            </EditButton>
                            <DeleteButton Text="删除" Visible="True">
                            </DeleteButton>
                            <CancelButton Text="取消" Visible="True">
                            </CancelButton>
                            <UpdateButton Text="保存" Visible="True">
                            </UpdateButton>
                            <CustomButtons>
                                <dx:GridViewCommandColumnCustomButton ID="gvcc3" Text="激活">
                                </dx:GridViewCommandColumnCustomButton>
                            </CustomButtons>
                        </dx:GridViewCommandColumn>
                        <dx:GridViewDataHyperLinkColumn Caption="用户编号" FieldName="UserCode" 
                            ReadOnly="True" VisibleIndex="0">
                            <PropertiesHyperLinkEdit NavigateUrlFormatString="AdminUserPositionCollect.aspx?UserCode={0}">
                            </PropertiesHyperLinkEdit>
                        </dx:GridViewDataHyperLinkColumn>
                        <dx:GridViewDataTextColumn FieldName="Email" ReadOnly="True" 
                            ShowInCustomizationForm="True" VisibleIndex="7">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataComboBoxColumn Caption="性别" FieldName="Gender" Visible="False" 
                            VisibleIndex="1">
                            <PropertiesComboBox DataSourceID="ldsGender" EnableFocusedStyle="False" 
                                TextField="Name" ValueField="ID" ValueType="System.Boolean">
                            </PropertiesComboBox>
                            <EditFormSettings Visible="True" />
                        </dx:GridViewDataComboBoxColumn>
<dx:GridViewDataTextColumn ShowInCustomizationForm="True" Caption="姓名" VisibleIndex="2">
    <EditFormSettings Visible="False" />
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="名" FieldName="CFirstName" 
                            VisibleIndex="4" ShowInCustomizationForm="True" Visible="False">
                            <EditFormSettings Visible="True" />
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="姓" FieldName="CLastName" 
                            ShowInCustomizationForm="True" VisibleIndex="3" Visible="False">
                            <EditFormSettings Visible="True" />
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="FirstName" FieldName="EFirstName" 
                            ShowInCustomizationForm="True" Visible="False" VisibleIndex="5">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="LastName" FieldName="ELastName" 
                            ShowInCustomizationForm="True" Visible="False" VisibleIndex="6">
                            <EditFormSettings Visible="True" />
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataComboBoxColumn Caption="国籍" FieldName="CountryId" 
                            Visible="False" VisibleIndex="8">
                            <PropertiesComboBox DataSourceID="ldsCountry" TextField="CCountry" 
                                ValueField="ID" ValueType="System.String">
                            </PropertiesComboBox>
                            <EditFormSettings Visible="True" />
                        </dx:GridViewDataComboBoxColumn>
                        <dx:GridViewDataTextColumn FieldName="Password" ShowInCustomizationForm="True" 
                            Visible="False" VisibleIndex="20">
                            <EditFormSettings Visible="False" />
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataDateColumn Caption="创建日期" FieldName="CreateDate" 
                            ReadOnly="True" ShowInCustomizationForm="True" Visible="False" 
                            VisibleIndex="9">
                            <EditFormSettings Visible="True" />
                        </dx:GridViewDataDateColumn>
                        <dx:GridViewDataTextColumn Caption="手机" FieldName="Mobile" ReadOnly="True" 
                            ShowInCustomizationForm="True" VisibleIndex="10">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="身份证号" FieldName="IDCard" 
                            ShowInCustomizationForm="True" Visible="False" VisibleIndex="11">
                            <EditFormSettings Visible="True" />
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataDateColumn Caption="生日" FieldName="BirthDay" 
                            ShowInCustomizationForm="True" Visible="False" VisibleIndex="12">
                            <EditFormSettings Visible="True" />
                        </dx:GridViewDataDateColumn>
                        <dx:GridViewDataCheckColumn Caption="婚否" FieldName="IsMarried" 
                            ShowInCustomizationForm="True" Visible="False" VisibleIndex="13">
                            <EditFormSettings Visible="True" />
                        </dx:GridViewDataCheckColumn>
                        <dx:GridViewDataTextColumn Caption="电话" FieldName="Tel" 
                            ShowInCustomizationForm="True" VisibleIndex="14">
                            <EditFormSettings Visible="True" />
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="邮编" FieldName="PostCode" 
                            ShowInCustomizationForm="True" Visible="False" VisibleIndex="15">
                            <EditFormSettings Visible="True" />
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="照片" FieldName="PhotoImage" 
                            ShowInCustomizationForm="True" Visible="False" VisibleIndex="16">
                            <EditFormSettings Visible="False" />
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn ShowInCustomizationForm="True" VisibleIndex="18" 
                            Caption="激活">
                            <PropertiesTextEdit EnableFocusedStyle="False">
                            </PropertiesTextEdit>
                            <EditFormSettings Visible="False" />
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewCommandColumn ButtonType="Button" Caption="简历" 
                            ShowInCustomizationForm="True" VisibleIndex="21" Width="60px" 
                            Visible="True">
                            <ClearFilterButton Visible="True">
                            </ClearFilterButton>
                            <CustomButtons>
                                <dx:GridViewCommandColumnCustomButton Text="中文" ID="gvcc1">
                                </dx:GridViewCommandColumnCustomButton>
                                <dx:GridViewCommandColumnCustomButton ID="gvcc2" Text="英文">
                                </dx:GridViewCommandColumnCustomButton>
                            </CustomButtons>
                        </dx:GridViewCommandColumn>
                        <dx:GridViewDataTextColumn ShowInCustomizationForm="True" VisibleIndex="17" 
                            Caption="简历创建" Width="60px">
                            <EditFormSettings Visible="False" />
                        </dx:GridViewDataTextColumn>
                    </Columns>
                    <SettingsEditing PopupEditFormHorizontalAlign="NotSet"
                        PopupEditFormVerticalAlign="NotSet" />
                    <SettingsText PopupEditFormCaption="用户信息" ConfirmDelete="是否删除选择的记录?" />
                </dx:ASPxGridView>
                <asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="TravelLink.DAL.TravelLinkDBDataContext"
                    EnableDelete="True" EnableInsert="True" EnableUpdate="True" EnableViewState="False"
                    EntityTypeName="" OrderBy="CreateDate desc" TableName="TL_User">
                </asp:LinqDataSource>
                <asp:LinqDataSource ID="ldsCountry" runat="server" 
                    ContextTypeName="TravelLink.DAL.TravelLinkDBDataContext" EntityTypeName="" 
                    OrderBy="SortID" TableName="TL_Country">
                </asp:LinqDataSource>
                <asp:LinqDataSource ID="ldsGender" runat="server" 
                    ContextTypeName="TravelLink.DAL.TravelLinkDBDataContext" EntityTypeName="" 
                    OrderBy="ID desc" TableName="View_Gender">
                </asp:LinqDataSource>
                <dx:ASPxGridViewExporter ID="ASPxGridViewExporter1" runat="server" 
                    GridViewID="ASPxGridView1">
                </dx:ASPxGridViewExporter>
            </td>
        </tr>
    </table>
</asp:Content>
